package com.dreamwhale.machinery.user.service;

import com.dreamwhale.machinery.user.entity.UserShop;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 商户表 服务类
 * </p>
 *
 * @author Author
 * @since 2020-05-28
 */
public interface UserShopService extends IService<UserShop> {
    /**
     * 模糊/条件/销量查询
     *
     * @param merchantName
     * @param provinceCode
     * @param cityCode
     * @return
     */
    List<UserShop> selectUserShopsLike(String merchantName, String provinceCode, String cityCode);

    /**
     * 模糊/条件/销量查询
     *
     * @param merchantName
     * @param provinceCode
     * @param cityCode
     * @return
     */
    List<UserShop> selectUserShopsLikeAsc(String merchantName, String provinceCode, String cityCode);

    /**
     * 根据商户id查询信息
     *
     * @param merId
     * @return
     */
    UserShop selectUserShopMassage(Integer merId);

    /**
     * 商家入驻
     *
     * @param userShop
     * @return
     */
    int insertUserShops(UserShop userShop);

    /**
     * 商户入驻查重
     *
     * @param userId
     * @return
     */
    int selectUserShopsCount(Integer userId);
}
